import React, { FC } from 'react'
import { useHistory } from 'react-router'
import { isLogined, setToken } from '../utils/auth'
const Login: FC = () => {
  const router = useHistory()
  const handleLoginClick = () => {
    setToken('123')
    setTimeout(() => {
      console.log(123)
      console.log(isLogined())
      router.push('/admin/base')
    }, 1000)
  }
  return (
    <div>
      <h1>Login</h1>
      <button onClick={handleLoginClick}>登录</button>
    </div>
  )
}
export default Login
